//
//  YbrRecordItem.m
//  wifibox
//
//  Created by xinle on 15/8/29.
//  Copyright (c) 2015年 yinbaner. All rights reserved.
//

//
//@property(nonatomic,copy)NSString *albumName; // 课程名称
//@property(nonatomic,copy)NSString *albumLei;
//@property(nonatomic,copy)NSString *albumImgUrl; // 课程图片
//@property(nonatomic,assign)int courseId;        // 课程id




#import "YbrRecordItem.h"

@implementation YbrRecordItem

+(instancetype)recordItemWithDict:(NSDictionary *)dict
{
    return [[self alloc]initWithDict:dict];
}

-(instancetype)initItemWithDict:(NSDictionary *)dict
{
    if (self = [super init]) {
        if ((NSNull *)dict[@"id"] != [NSNull null]) {
            self.courseId = [dict[@"id"] intValue];
        }
        
        if (![(NSNull *)dict[@"user_id"] isKindOfClass:[NSString class]]) {
            self.userId = [dict[@"user_id"] intValue];
        }
        
        // 音频名称
        self.recordName     =   dict[@"name"];
        
        self.albumImgUrl    =   dict[@"mob_large_img"];
        self.albumName      =   dict[@"course_name"];
        self.catName        =   dict[@"cat_name"];
        
    }
    return self;
}

@end
